/**
 * 封装路由
 */
import 'package:flutter_benchu/utils/commonPkg.dart';

class ApplicationRouter extends FluroRouter {
  ApplicationRouter() : super();

  Future navTo(
      BuildContext context, String path,
      {
        bool replace = false,
        Map<String, dynamic> param = const {},
        bool clearStack = false,
        TransitionType transition,
        Duration transitionDuration = const Duration(milliseconds: 250),
        RouteTransitionsBuilder transitionBuilder
      }
  ) {
    String newPath=resolveParam(param, path);
    Log.v(path, tag: '###ROUTE###');
    if(param.length!=0){
      Log.v(param, tag: '###PARAM###');
    } 
    return super.navigateTo(
      context,
      newPath,
      replace: replace,
      clearStack: clearStack,
      transition: transition,
      transitionDuration: transitionDuration,
      transitionBuilder: transitionBuilder,
    );
  }

}

final ApplicationRouter appRouter = ApplicationRouter();